Imports System.Data
Imports System.Data.SqlClient

Public Class Tipomaterial
    Dim oCommand As SqlCommand


    Private _codtipomaterial As Int32
    Public Property codtipomaterial() As Int32
        Get
            Return _codtipomaterial
        End Get

        Set(ByVal value As Int32)
            _codtipomaterial = value
        End Set
    End Property

    Private _descrtipomate As String
    Public Property descrtipomate() As String
        Get
            Return _descrtipomate
        End Get

        Set(ByVal value As String)
            _descrtipomate = value
        End Set
    End Property
    Public Function tipomateAdd()
        Try
            oCommand = New SqlCommand("TipomateAdd", cn)
            oCommand.CommandType = CommandType.StoredProcedure
            oCommand.Parameters.AddWithValue("@descrtipomate", SqlDbType.Int).Value = _descrtipomate
            cn.Open()
            oCommand.ExecuteNonQuery()

        Catch ex As Exception
            MessageBox.Show(ex.Message)
        Finally
            cn.Close()
        End Try

    End Function

End Class
